package usage;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-06 15:31
 **/
public class ProtoType {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        Monster monster1 = context.getBean("id01", Monster.class);
        Monster monster2 = context.getBean("id01", Monster.class);
        System.out.println(monster1);
        System.out.println(monster2);
        System.out.println(monster1 == monster2);
        System.out.println(monster1.getClass() == monster2.getClass());
        System.out.println(monster1.equals(monster2));
    }
}
